#!/usr/bin/env python3
# -*- coding: utf-8 -*-

class Cat:
    """Cat 类
    ---------
    属性：
    name
    gender [男]
    color [黄色]
    ---------
    方法method:
    say_hello
    """
    def __init__(self, name, gender='男', color='黄色'):
        self.name = name
        self.gender = gender
        self.color = color

    def say_hello(self):
        print('Hello', self.name)

    def foo(self):
        print('五彩斑斓的', self.color)

    def marry(self, other):
        # self, other: Cat
        if self.gender != other.gender:
            print('OK')
        else:
            print('NO')
    def fight(self, dog):
        print(self.name, '抓了', dog.name, '一下')

class Dog:
    def __init__(self, name):
        self.name = name

    def fight(self, cat):
        print(self.name, '咬了', cat.name, '一口')

carfield = Cat('加菲猫', '男', '黄')
doreamon = Cat('多啦A梦', '男', '蓝')
kitty = Cat('Kitty猫', '女', '红')
snoopy = Dog('史努比')
kitty.fight(snoopy)
snoopy.fight(kitty)
